home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1999 February / Macworld (1999-02).dmg / Shareware World / Shareware Feature / PageSpinner 2.0.1 / Settings / FTP / Scripts / Anarchie Save To FTP Server.txt next >
Text File  |  1997-06-17  |  967b  |  51 lines

  1. global gDesturl
  2. global gPrevurl
  3. property gNumTransfers : 0
  4.  
  5. on specify_destination()
  6.     global gDesturl
  7.     local prefsFile
  8.     
  9.     set gNumTransfers to gNumTransfers + 1
  10.     
  11.     tell application "PageSpinner"
  12.     set thePath to ((get PageSpinner folder) as text) & "Settings:FTP:FTP Server Settings"
  13.     end tell
  14.     
  15.     set prefsFile to open for access file thePath 
  16.     
  17.     set gDesturl to read prefsFile
  18.     if (gNumTransfers is 1) then
  19.         set gPrevurl to "*"
  20.     end if
  21.     close access of the prefsFile
  22.     
  23. end specify_destination
  24.  
  25. on open doc
  26.     global gDesturl
  27.     global gPrevurl
  28.     
  29.     specify_destination()
  30.     
  31.     with timeout of 60000 seconds
  32.         tell application "Anarchie"
  33.             store doc url gDesturl with binary
  34.             beep
  35.             if gPrevurl is not gDesturl then -- display file list the first time we use this url
  36.                 list url gDesturl with window
  37.                 set gPrevurl to gDesturl
  38.             end if
  39.         end tell
  40.     end timeout
  41.     
  42. end open
  43.  
  44. on quit
  45.     set gNumTransfers to 0
  46.      continue quit
  47. end quit
  48.  
  49. on run
  50.     specify_destination()
  51. end run